import React, { Component } from "react";
import logo from './img/10.jpg';

const img2=require('./img/8.jpg').default;
//? app是函数组件，没有状态，无状态组件
function App() {
    const title='<h1>hello react</h1>'
    return (
        <div className="APP">
            <img src={logo}/>
            <img src={img2}/>
            <img src={require('./img/9.jpg').default}/>
            <h2 style={ 
                    {
                        height:80 , 
                        width:'200px',
                        backgroundColor:'pink'
                    } 
                }>style</h2>

                                        {/* 里面还有一个大括号，代表对象  当做react元素解析*/}
            <div dangerouslySetInnerHTML={ {__html:title} }></div>
            <div>{title}</div>
            <label htmlFor='inp'>用户名</label>
            <input id='inp'/>
        </div>
    )
}

export default App;
